package situ.autoweter.entity;

import com.alibaba.fastjson.JSONObject;
import java.util.*;
import java.time.*;
/**
 * PY_Bill实体类
 * 
 * @author 
 *
 */
public class PyBill {
	/***/
	private String BillNo; 
	/***/
	private Integer ReadID; 
	/***/
	private String UserNo; 
	/***/
	private java.time.Instant CreateDate; 
	/***/
	private Double BillMoney; 
	/***/
	private Double RealMoney; 
	/***/
	private Integer Balance; 
	/***/
	private java.time.Instant BalanceDate;

	private List<PyBilldetail> pyBilldetails;
	/**
	 * 实例化
	 */
	public PyBill() {
		super();
	}
	/**
	 * 实例化
	 * 
	 * @param obj
	 */
	public PyBill(JSONObject obj) {
		this();
		if (obj.get("BillNo") instanceof String) {
			this.setBillNo((String) obj.get("BillNo"));
		}
		if (obj.get("ReadID") instanceof Number) {
			this.setReadID(((Number) obj.get("ReadID")).intValue());
		}
		if (obj.get("UserNo") instanceof String) {
			this.setUserNo((String) obj.get("UserNo"));
		}
		if (obj.get("CreateDate") instanceof java.time.Instant) {
			this.setCreateDate((java.time.Instant) obj.get("CreateDate"));
		}
		if (obj.get("BillMoney") instanceof Number) {
			this.setBillMoney(((Number) obj.get("BillMoney")).doubleValue());
		}
		if (obj.get("RealMoney") instanceof Number) {
			this.setRealMoney(((Number) obj.get("RealMoney")).doubleValue());
		}
		if (obj.get("Balance") instanceof Number) {
			this.setBalance(((Number) obj.get("Balance")).intValue());
		}
		if (obj.get("BalanceDate") instanceof java.time.Instant) {
			this.setBalanceDate((java.time.Instant) obj.get("BalanceDate"));
		}
	}
	
	/**
	 * 将当前对象转换为JsonObject
	 * 
	 * @return
	 */
	public JSONObject toJson() {
		JSONObject result = new JSONObject();
		if (this.getBillNo() != null) {
			result.put("BillNo",this.getBillNo());
		}
		if (this.getReadID() != null) {
			result.put("ReadID",this.getReadID());
		}
		if (this.getUserNo() != null) {
			result.put("UserNo",this.getUserNo());
		}
		if (this.getCreateDate() != null) {
			result.put("CreateDate",this.getCreateDate());
		}
		if (this.getBillMoney() != null) {
			result.put("BillMoney",this.getBillMoney());
		}
		if (this.getRealMoney() != null) {
			result.put("RealMoney",this.getRealMoney());
		}
		if (this.getBalance() != null) {
			result.put("Balance",this.getBalance());
		}
		if (this.getBalanceDate() != null) {
			result.put("BalanceDate",this.getBalanceDate());
		}
		return result;
	}
	
	
	/**
	 * 获取BillNo
	 * 
	 * @return
	 */
	public String getBillNo() {
		return BillNo;
	}

	/**
	 * 设置BillNo
	 * 
	 * @param BillNo
	 */
	public void setBillNo(String BillNo) {
		this.BillNo = BillNo;
	}
	
	/**
	 * 获取ReadID
	 * 
	 * @return
	 */
	public Integer getReadID() {
		return ReadID;
	}

	/**
	 * 设置ReadID
	 * 
	 * @param ReadID
	 */
	public void setReadID(Integer ReadID) {
		this.ReadID = ReadID;
	}
	
	/**
	 * 获取UserNo
	 * 
	 * @return
	 */
	public String getUserNo() {
		return UserNo;
	}

	/**
	 * 设置UserNo
	 * 
	 * @param UserNo
	 */
	public void setUserNo(String UserNo) {
		this.UserNo = UserNo;
	}
	
	/**
	 * 获取CreateDate
	 * 
	 * @return
	 */
	public java.time.Instant getCreateDate() {
		return CreateDate;
	}

	/**
	 * 设置CreateDate
	 * 
	 * @param CreateDate
	 */
	public void setCreateDate(java.time.Instant CreateDate) {
		this.CreateDate = CreateDate;
	}
	
	/**
	 * 获取BillMoney
	 * 
	 * @return
	 */
	public Double getBillMoney() {
		return BillMoney;
	}

	/**
	 * 设置BillMoney
	 * 
	 * @param BillMoney
	 */
	public void setBillMoney(Double BillMoney) {
		this.BillMoney = BillMoney;
	}
	
	/**
	 * 获取RealMoney
	 * 
	 * @return
	 */
	public Double getRealMoney() {
		return RealMoney;
	}

	/**
	 * 设置RealMoney
	 * 
	 * @param RealMoney
	 */
	public void setRealMoney(Double RealMoney) {
		this.RealMoney = RealMoney;
	}
	
	/**
	 * 获取Balance
	 * 
	 * @return
	 */
	public Integer getBalance() {
		return Balance;
	}

	/**
	 * 设置Balance
	 * 
	 * @param Balance
	 */
	public void setBalance(Integer Balance) {
		this.Balance = Balance;
	}
	
	/**
	 * 获取BalanceDate
	 * 
	 * @return
	 */
	public java.time.Instant getBalanceDate() {
		return BalanceDate;
	}

	/**
	 * 设置BalanceDate
	 * 
	 * @param BalanceDate
	 */
	public void setBalanceDate(java.time.Instant BalanceDate) {
		this.BalanceDate = BalanceDate;
	}

	public List<PyBilldetail> getPyBilldetails() {
		return pyBilldetails;
	}

	public void setPyBilldetails(List<PyBilldetail> pyBilldetails) {
		this.pyBilldetails = pyBilldetails;
	}

	@Override
	public String toString() {
		return "PyBill [BillNo=" + BillNo + " , ReadID=" + ReadID + " , UserNo=" + UserNo + " , CreateDate=" + CreateDate + " , BillMoney=" + BillMoney + " , RealMoney=" + RealMoney + " , Balance=" + Balance + " , BalanceDate=" + BalanceDate + " ，pyBilldetails="+pyBilldetails+"  ]";
	
	}
	
	
}
